﻿using SalesSys.DAL.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SalesSys.DAL.Models
{
    /// <summary>
    /// 计划单上传凭证
    /// </summary>
    public class OrderVoucher : DbEntityBase<Guid>
    {
        public Order Order { get; set; }
        /// <summary>
        /// 计划单编号
        /// </summary>
        public Guid OrderId { get; set; }


        /// <summary>
        /// 文件名称
        /// </summary>
        public string FileName { get; set; }

        public class Mapper : SalMapper<OrderVoucher, Guid>
        {
            public Mapper()
            {

            }
        }
    }

    public class FileList : DbEntityBase<Guid>
    {
        /// <summary>
        /// 客户信息上传
        /// </summary>
        public const int CustomerInfo=1;
        public FileList()
        {
            CreateTime = DateTime.Now;
        }

        /// <summary>
        /// 上传编号
        /// </summary>
        public Guid LinkId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 发起类型
        /// </summary>
        public int FromType { get; set; }

        /// <summary>
        /// 文件目录名
        /// </summary>
        public string FileExtName { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 创建人编号
        /// </summary>
        public Guid CreaterId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Tag { get; set; }
        public class Mapper : SalMapper<FileList, Guid>
        {
            public Mapper()
            {
                Property(p => p.Tag).HasMaxLength(1000);
            }
        }

    }
}
